<template>
<div class="item">
  <div class="active-icons hot" v-if="is_hot = 'Y'">热卖</div>
  <router-link :to="`/select?series=${item.id}&id=${banId}`" target="_blank">
    <div class="pic" >
      <el-image class="swiper-lazy" style="width: 175px; height: 175px" fit="fill" :src="item.image"  lazy >

      </el-image>
      <!-- <img :src="item.image" alt="" class="swiper-lazy"> -->
    </div>
    <div class="cnt">
      <div>
        <p class="tt">{{item.title}}</p>
        <p class="subTt">{{item.name}}</p>
        <div class="sale">
          <svg-icon icon-class="red_huiyuan" class-name="red_huiyuan"  />
          <em>&nbsp;&nbsp;{{item.min_price}}起</em>
          <i>x</i>会员折扣
        </div>
      </div>
    </div>
  </router-link>
</div>
</template>
<script>
// import { goods } from '@/utils/goods.js'
export default {
  name: 'goods-item',
  props: {
    item: {
      type: Object,
      default: () => {}
    },
    banId: {
      type: Number,
      default: ''
    }
  },
  data () {
    return {
      is_hot: 'N',
      default_url: require('../assets/img/fnx-1.jpg')
    }
  }
}
</script>

<style lang="scss" scoped>
.item {
  position: relative;
  float: left;
  width: 220px;
  height: 290px;
  margin: 0 0 10px 10px;
  background: #fff;
  -webkit-transition: linear .25s;
  -o-transition: linear .25s;
  transition: linear .25s;
  .active-icons.promotions {
    background: url('../assets/img/splis.png') no-repeat -98px -320px;
  }
  .active-icons {
    position: absolute;
    width: 76px;
    height: 64px;
    right: 0;
    top: 0;
    text-align: right;
    font-size: 14px;
    padding: 10px 6px 0 0;
    box-sizing: border-box;
    color: #fff;
    z-index: 2;
  }
  a {
    text-decoration: none;
    .pic {
      height: 180px;
      display: -webkit-box;
      display: -moz-box;
      display: -ms-flexbox;
      display: -webkit-flex;
      display: flex;
      -webkit-box-align: center;
      -moz-box-align: center;
      -ms-flex-align: center;
      -webkit-align-items: center;
      align-items: center;
      -webkit-box-pack: center;
      -moz-box-pack: center;
      -ms-flex-pack: center;
      -webkit-justify-content: center;
      justify-content: center;
      img {
        max-width: 175px;
        margin-top: 14px\0;
      }
    }
    .cnt {
      height: 102px;
      .tt {
        color: #2b2b2b;
        font-size: 16px;
      }
      .subTt {
        color: #868686;
        font-size: 12px;
        margin-top: 10px;
      }
      .sale {
        position: relative;
        display: inline-block;
        // height: 25px;
        line-height: 21px;
        border: 1px solid #ff0000;
        font-size: 12px;
        color: #ff0000;
        padding: 0 8px 0 25px;
        margin: 14px 0 0 0;
        .svg-icon {
          position: absolute;
          display: inline-block;
          width: 22px;
          height: 21px;
          line-height: 23px;
          margin-right: 10px;
          text-align: center;
          color: #fff;
          font-size: 16px;
          background: #ff0000;
          left: 0px;
          em {
            font-size: 14px;
          }
          i {
            vertical-align: top;
          }
        }
      }
    }
  }
  a:hover {

  }

}
.item:hover {
  -webkit-box-shadow: 0 6px 10px rgba(0,0,0,0.1);
  box-shadow: 0 6px 10px rgba(0,0,0,0.1);
  -webkit-transform: translate3d(0,-2px,0);
  transform: translate3d(0,-2px,0);
}
.el-image>img{
  width: 175px;
  height: 175px;
}
</style>
